﻿<UserControl x:Class="PAM.Views.SettingsView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:ViewModels="clr-namespace:PAM.ViewModels" xmlns:Core1="clr-namespace:PAM.Core.Converters.PAM.Core;assembly=PAM.Core" mc:Ignorable="d" 
             d:DesignHeight="383" d:DesignWidth="297">
<UserControl.Resources>
        <Core1:SecondsToTimeConverter x:Key="TimeConverter" />
</UserControl.Resources>
    
<DockPanel d:DataContext="{d:DesignInstance {x:Type ViewModels:SettingsViewModel}}">
    
        <Border DockPanel.Dock="Top" Margin="10" CornerRadius="10" Background="#1300FF00">
            <Expander Header="Auto idle" IsExpanded="True">
                <StackPanel>
                <TextBlock TextWrapping="Wrap" Margin="5">Set the idle time, after which the application suspends counting your activity.
                    It is auto reasumed after any activity detected. Currently the idle time is set to <TextBlock Text="{Binding Path=AutoIdle, Converter={StaticResource TimeConverter}}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="12" Padding="0" />
                    </TextBlock>
                <Slider Value="{Binding AutoIdle}" Minimum="1" Maximum="300" />
                </StackPanel>
            </Expander>
        </Border>
        <Border DockPanel.Dock="Top" Margin="10" CornerRadius="10" Background="#1300FF00">
            <Expander Header="Auto start" IsExpanded="True">
                <StackPanel>
                    <TextBlock TextWrapping="Wrap" Margin="5">Do you want to start this application automaticly 
                        during the startup of the system?
                    </TextBlock>
                        <CheckBox IsChecked="{Binding Autostart}">Start application automaticly</CheckBox>
                    </StackPanel>
            </Expander>
        </Border>
        <Border DockPanel.Dock="Top" Margin="10" CornerRadius="10" Background="#1300FF00">
            <Expander Header="Auto export" IsExpanded="True">
                <StackPanel>
                    <TextBlock TextWrapping="Wrap" Margin="5">Auto exporting data to xml file every <TextBlock Text="{Binding Path=AutoExportInterval, Converter={StaticResource TimeConverter}}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="12" Padding="0" /></TextBlock>
                    <CheckBox IsChecked="{Binding AutoexportEnabled}">Enabled</CheckBox>
                    <StackPanel Orientation="Horizontal">
                        <Label Content="{Binding Path=AutoExportPath}"/>
                        <Button Click="ButtonClick">Select path</Button>
                    </StackPanel>
                    <Slider Value="{Binding AutoExportInterval}" Minimum="1" Maximum="3600" />
                </StackPanel>
            </Expander>
        </Border>
    </DockPanel>
</UserControl>
